﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Showroom.DAL;
using System.Collections.Specialized;
using System.Data.SqlClient;
using System.Data;

namespace Showroom.BLL
{
    public class View_ListProducts : _View_ListProducts
    {
        public static View_ListProducts GetListByCategoryID(int CategoryID)
        {
            try
            {
                View_ListProducts cProds = new View_ListProducts();
                cProds.proc_GetListProduct(CategoryID);
                return cProds;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }

        public void proc_GetListProduct(int CategoryID)
        {
            ListDictionary parameters = new ListDictionary();

            parameters.Add(new SqlParameter("@CategoryID", SqlDbType.Int, 0), CategoryID);

            LoadFromSql("proc_GetListProduct", parameters);
        }
    }
}
